package com.zhonghui.common.eshopUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CateDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    private Long pid;
    private String cateName;
    private String pic;
    private List<CateDTO> children = new ArrayList();

    public CateDTO() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getPid() {
        return this.pid;
    }

    public String getCateName() {
        return this.cateName;
    }

    public String getPic() {
        return this.pic;
    }

    public List<CateDTO> getChildren() {
        return this.children;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setPid(final Long pid) {
        this.pid = pid;
    }

    public void setCateName(final String cateName) {
        this.cateName = cateName;
    }

    public void setPic(final String pic) {
        this.pic = pic;
    }

    public void setChildren(final List<CateDTO> children) {
        this.children = children;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof CateDTO)) {
            return false;
        } else {
            CateDTO other = (CateDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label71: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label71;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label71;
                    }

                    return false;
                }

                Object this$pid = this.getPid();
                Object other$pid = other.getPid();
                if (this$pid == null) {
                    if (other$pid != null) {
                        return false;
                    }
                } else if (!this$pid.equals(other$pid)) {
                    return false;
                }

                label57: {
                    Object this$cateName = this.getCateName();
                    Object other$cateName = other.getCateName();
                    if (this$cateName == null) {
                        if (other$cateName == null) {
                            break label57;
                        }
                    } else if (this$cateName.equals(other$cateName)) {
                        break label57;
                    }

                    return false;
                }

                Object this$pic = this.getPic();
                Object other$pic = other.getPic();
                if (this$pic == null) {
                    if (other$pic != null) {
                        return false;
                    }
                } else if (!this$pic.equals(other$pic)) {
                    return false;
                }

                Object this$children = this.getChildren();
                Object other$children = other.getChildren();
                if (this$children == null) {
                    if (other$children == null) {
                        return true;
                    }
                } else if (this$children.equals(other$children)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof CateDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $pid = this.getPid();
        result = result * 59 + ($pid == null ? 43 : $pid.hashCode());
        Object $cateName = this.getCateName();
        result = result * 59 + ($cateName == null ? 43 : $cateName.hashCode());
        Object $pic = this.getPic();
        result = result * 59 + ($pic == null ? 43 : $pic.hashCode());
        Object $children = this.getChildren();
        result = result * 59 + ($children == null ? 43 : $children.hashCode());
        return result;
    }

    public String toString() {
        return "CateDTO(id=" + this.getId() + ", pid=" + this.getPid() + ", cateName=" + this.getCateName() + ", pic=" + this.getPic() + ", children=" + this.getChildren() + ")";
    }
}
